var leadTable;
var selected_id;
$(document).ready(function() {
	leadTable = $('#sharedLeadTable').dataTable({
		"sDom": 'flrtip',
		"bFilter" : true,
		"sPaginationType" : "bootstrap",
		"oLanguage" : {
			"sLengthMenu" : "Display _MENU_ records per page",
			"sZeroRecords" : "Nothing found - sorry",
			"sInfo" : "Showing _START_ to _END_ of _TOTAL_ records",
			"sInfoEmpty" : "Showing 0 to 0 of 0 records"
		},
		"bProcessing" : true,
		"bServerSide" : false,
		"sAjaxSource" : "sharedLeads",
		"aoColumns" : [ 
		                {"mData" : "id"},
		                {"mData" : "name"},
		                {"mData" : "leadstatus"}, 
		                {"mData" : "company"},
		                {"mData" : "owner"}
		               ],
		"aoColumnDefs": [
		                 { "sName": "id",   "aTargets": [ 0 ] },
		                 { "sName": "name",  "aTargets": [ 1 ] },
		                 { "sName": "leadstatus", "aTargets": [ 2 ] },
		                 { "sName": "company",  "aTargets": [ 3 ] },
		                 { "sName": "owner",    "aTargets": [ 4 ] }
		               ]
	});
});